package com.sitc.administrator.application.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.sitc.administrator.application.fragment.MainHomeFragment;
import com.sitc.administrator.application.fragment.MainMeFragment;
import com.sitc.administrator.application.fragment.MainMsgFragment;


public class MainContentAdapter extends BaseFragmentPagerAdapter<Integer> {

    public MainContentAdapter(Context context, FragmentManager fm) {
        super(context, fm);
    }

    @Override
    public Fragment getItem(int position) {

        switch (position) {

            case 0:
                return MainHomeFragment.newInstance(getData(position));

            case 1:
                return MainMsgFragment.newInstance(getData(position));

            case 2:
                return MainMeFragment.newInstance(getData(position));

            default :
                return null;
        }

    }

}
